﻿@model BrnMall.Web.StoreAdmin.Models.BrokerageRequestListModel
@using BrnMall.Web.StoreAdmin.Models

@section header{
    <title>佣金明细</title>
    <link type="text/css" rel="stylesheet" href="/admin_store/css/site.css" />
    <script type="text/javascript" src="/admin_store/scripts/jquery.js"></script>
    <script type="text/javascript" src="/components/my97datepicker/WdatePicker.js"></script>
    <link rel="stylesheet" type="text/css" href="/components/jbox/Skins/Default/jbox.css" />
    <script type="text/javascript" src="/components/jbox/jquery.jBox-2.3.min.js"></script>
    <script type="text/javascript" src="/admin_store/scripts/selectlist.js"></script>
    <script type="text/javascript" src="/admin_store/scripts/showlist.js"></script>
}
@section body{
    <h1 class="rightH1 nav-fx">
        小程序分销 &gt; 佣金管理 &gt; <span class="rightH1-cur">申请提现</span>
        <div class="right">
            <div class="clear"></div>
        </div>
        <div class="clear"></div>
    </h1>
    @using (Html.BeginForm("BrokerageRequestList", "Distributor"))
    {
        <div class="dataListSearch">
            <table height="32">
                <tbody class="col3">
                <tr>
                    <td class="td1">分销商名称：@Html.TextBoxFor(x => x.DisStoreName, new { height = "18" })</td>
                    <td class="td2">申请时间：@Html.TextBox("requestTimeStart", Model.RequestTimeStart, new { height = "18", onfocus = "WdatePicker({el:'requestTimeStart'})" })</td>
                    <td class="td3">结束时间：@Html.TextBox("requestTimeEnd", Model.RequestTimeEnd, new { height = "18", onfocus = "WdatePicker({el:'requestTimeEnd'})" })</td>
                    <td><input id="SearchBrokerage" name="SearchBrokerage" type="image" class="searchBut submit" src="/admin_store/images/s.jpg" /></td>
                </tr>
                </tbody>
            </table>
        </div>

        <div class="dataList">
            <table width="100%">
                <thead>
                <tr>
                    <th width="60" align="left">编号</th>
                    <th>分销商</th>
                    <th>分销商名称</th>
                    <th style="width:90px;">申请时间</th>
                    <th>提现金额</th>
                    <th>转账方式</th>
                    <th>支付日期</th>
                    <th>支付状态</th>
                    <th>审核人</th>
                    <th>审核时间</th>
                    <th>审核状态</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                @foreach (BrokerageRequestModel bro in Model.BrokerageRequestList)
                {
                    <tr>

                        <td>@bro.Id</td>
                        <td><img style="border-radius: 25px;" width="50" height="50" alt="" src="@bro.Distributor.ShowLogo" /></td>
                        <td>@bro.Distributor.DisStoreName</td>
                        <td>@bro.RequestTime.ToString("yyyy-MM-dd HH:mm:ss")</td>
                        <td><span style="color:#e17a00">@bro.Amount.ToString("0.00")</span> </td>

                        <td>微信企业转账</td>
                        <td>@if (bro.SendTime.Year != 1900)
                            {
                                @bro.SendTime.ToString("yyyy-MM-dd")<br />
                                @bro.SendTime.ToString("HH:mm:ss")
                        }
                            
                        </td>
                        <td>@if (bro.PayStatus == 0)
                            {
                                @:待发放
                            }
                            else
                            {
                            @:已发放
                            }

                        </td>
                        <td>
                            @bro.ApprovedUserName
                        </td>
                        <td>@if (bro.ApprovedTime.Year != 1900)
                            {
                                @bro.ApprovedTime.ToString("yyyy-MM-dd") <br />
                                @bro.ApprovedTime.ToString("HH:mm:ss")
                        }
                            
                        </td>
                        <td>@if (bro.Status == 0)
                            {
                                @:待审核
                            }
                            else
                            {
                                @:已审核
                            }

                        </td>
                        <td>
                            @if (bro.Status == 0)
                            {
                                @Html.ActionLink("审核", "ApproveRequest", new { id = @bro.Id}, new { @class = "editOperate checkOperate" })
                                <span class="btn-line">|</span>
                            }
                             @if (bro.Status == 1 && bro.PayStatus == 0)
                             {
                                @Html.ActionLink("发放佣金", "SendRequest", new { brsn = @bro.Brsn}, new { @class = "editOperate" })
                                <span class="btn-line">|</span><br />
                                 @Html.ActionLink("已私下发放佣金", "OfflineSendRequest", new { brsn = @bro.Brsn }, new { @class = "editOperate checkOperate" })
                             }

                        </td> 
                    </tr>
                }
                </tbody>
            </table>
        </div>
        <div class="dataListEdit">

            <div class="page">
                @Html.StoreAdminPager(Model.PageModel)
            </div>
        </div>
    }
}